package com.san.park;

import java.util.concurrent.atomic.AtomicInteger;

public class Position {
	/**
	 * Which type of cars according to size and shape. For Example: Toyota Camri, Honda Accord, Bugatti etc. 1
	 * Marcedeze, BMW , Honda City, Sonata etc.  2
	 * Maruti Wagoner, omni etc. 0 
	 */
	private int type;
	
	
	private Car filledIn;
	/**
	 * Uniquely assigns position.
	 */
	private int position;	
	
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getPosition() {
		return position;
	}
	public void setPosition(int position) {
		this.position = position;
	}
	
	public boolean canAccomodate(Car car){
		// TODO  Add logic here
		return true;
	}	
	
	
	public void setFilledIn(Car car) {
		if(canAccomodate(car)&&isEmpty()){
			this.filledIn = car;
			
		}		
	}
	
	public void free(){
		filledIn = null;
	}
	public boolean isEmpty(){
		if(filledIn==null){
			return true;
		}else{
			return false;
		}
	}

	public Object clone(){
		return this.clone();
	}
}
